<template>
  <div>
    <el-row>
      <el-input
        class="input"
        placeholder="根据用户名搜索"
        v-model="input"
        clearable
        @change='search(input)'
      ></el-input>
      <el-button class="confirm">清空</el-button>
      <el-button type="primary" class="cancel" @click="search(input)">搜索</el-button>
    </el-row>
  </div>
</template>

<script>
// import { simple } from '@/api/base/users.js'

export default {
  name: 'KeywordSearch',
  data () {
    return {
      input: ''
    }
  },
  methods: {
    search (input) {
      this.$emit('search', input)
    }
  }
}
</script>

<style scoped lang="less">
.input {
  height: 36px;
  width: 200px;
  font-size: 12px;
  margin-right: 12px;
}
.confirm {
  height: 36px;
  width: 56px;
  padding-left: 15px;
  font-size: 12px;
}
.cancel {
  height: 36px;
  width: 56px;
  padding-left: 15px;
  font-size: 12px;
}
</style>
